Skip to content

Conversation

@sudiptob2
Copy link
Contributor

@sudiptob2 sudiptob2 commented Mar 6, 2024

fixes #36077

Kubernetes pod Event API provides type i.e. Warning and Normal. It is possible to log event failures into different log levels using this type attribute.
Ref: https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/event-v1/

Initial testing gives following output:
Test Dag: test_fail_dag_2
Output:
image

@boring-cyborg boring-cyborg bot added area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues labels Mar 6, 2024
@sudiptob2 sudiptob2 force-pushed the fix/k8s-irrelevant-logs branch from 380628b to 7b17ad7 Compare March 6, 2024 19:17
@sudiptob2 sudiptob2 marked this pull request as ready for review March 6, 2024 19:18
@potiuk
Copy link
Member

potiuk commented Mar 6, 2024

Looks good. Two comments:

  • can you please rebase
  • can you plesed add a unit test for that one ?

@sudiptob2 sudiptob2 force-pushed the fix/k8s-irrelevant-logs branch 2 times, most recently from 226f58b to b456308 Compare March 6, 2024 21:38
@sudiptob2 sudiptob2 changed the title fix: reduce error irrelevant error logs for pod events. fix: reduce irrelevant error logs for pod events. Mar 6, 2024
@sudiptob2 sudiptob2 force-pushed the fix/k8s-irrelevant-logs branch from 3aa05e8 to 83b7756 Compare March 6, 2024 22:36
Signed-off-by: sudipto baral <sudiptobaral.me@gmail.com>
@sudiptob2 sudiptob2 force-pushed the fix/k8s-irrelevant-logs branch from 83b7756 to a253b98 Compare March 6, 2024 22:39
@sudiptob2
Copy link
Contributor Author

@potiuk thanks for looking at the PR.

  • can you plesed add a unit test for that one ?

Added a unit test.

@ketozhang
Copy link
Contributor

Looks good to me, nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce irrelevant ERROR level logs from KubernertesPodOperator on pod runtime failure

3 participants